﻿<UserControl x:Class="P2.Cuberry.Modules.Framework.HistoryTracker.HistoryTrackerListView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >


    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/CuberryDataGrid.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    
    <Grid VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" MinHeight="44" />            
 
        </Grid.RowDefinitions>

        <DataGrid Grid.Row ="0" ItemsSource="{Binding}" 
                     Name="HistoryTrackerList" 
                     SelectionChanged="HistoryTrackerList_SelectionChanged" 
                     MouseDoubleClick="HistoryTrackerList_DblClick" 
                     Style="{DynamicResource CuberryDataGridStyle}"
                     VerticalAlignment="Stretch" >
            
            <DataGrid.Columns>
                <DataGridTextColumn Header="{Translate ModuleNameL}" Binding="{Binding Path=ModuleName}" MinWidth="25" Width="120" />
                <DataGridTextColumn Header="{Translate EntityNameL}" Binding="{Binding Path=EntityName}" MinWidth="25" Width="120" />
                <DataGridTextColumn Header="{Translate EntityFieldNameL}" Binding="{Binding Path=EntityFieldName}" MinWidth="25" Width="120" />
                <DataGridTextColumn Header="{Translate ItemIDL}" Binding="{Binding Path=ItemID}" MinWidth="25" Width="120" />
                <DataGridTextColumn Header="{Translate OldValueL}" Binding="{Binding Path=OldValue}" MinWidth="25" Width="120" />
                <DataGridTextColumn Header="{Translate NewValueL}" Binding="{Binding Path=NewValue}" MinWidth="25" Width="120" />
                <DataGridTextColumn Header="{Translate LogTimeL}" Binding="{Binding Path=LogTime}" MinWidth="25" Width="120" />
                <DataGridTextColumn Header="{Translate UserIDL}" Binding="{Binding Path=UserID}" MinWidth="25" Width="*" />                

            </DataGrid.Columns>
        </DataGrid>
    
</Grid>
</UserControl>
